<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="Access-Control-Allow-Origin" content="*">
    <title>Fetch 跨域</title>
</head>

<body>
    <article>
        <h1>Fetch 跨域</h1>
    </article>
</body>
<script>
    var headers,
        g_response;
    var myHeaders = new Headers();
    myHeaders.append('Access-Control-Allow-Origin','*');

    var myInit = {
        method: 'GET',
        headers: myHeaders,
        mode: 'no-cors',
        cache: 'default',
        credentials: 'include',
    };
    fetch('https://riverbankcomputing.com/software/pyqt/download5', myInit)
        .then(function (response) {
            g_response = response;
            headers = response.headers;
            console.log(response.ok);
            return response.body;
        })
        .then(function (data) {
            console.log(data);
        });
</script>

</html>